<template>
  <div class="hospital_cell" @click="lookDetail()">
    <div class="avatar">
      <van-image :src="IMAGEURL + info.hospitalLogo" class="img" lazy-load v-if="info.hospitalLogo" :alt="`${$cookies.get('city')}-${info.hospitalName}资质`" />
      <!-- <div class="text_logo" v-else-if="info.textLogo">{{ info.textLogo }}</div> -->
      <TextLogo :name="info.textLogo" v-else-if="info.textLogo"></TextLogo>
      <van-image :src="require('@/assets/images/avatar/hosp_default_circle.png')" class="img" lazy-load v-else  :alt="`${$cookies.get('city')}-${info.hospitalName}资质`" />
    </div>
    <div class="info">
      <div class="title">
        <span class="name">{{ info.hospitalName }}</span>
        <img src="@/assets/images/inquire/hot.png" class="img" alt="" v-if="hot && index < 3">
      </div>
      <div class="rate">
        <div class="box">
          <span class="name">法定代表人</span>
          <span class="txt">{{ info.legalPerson }}</span>
        </div>
        <div class="box">
          <span class="name">注册资本</span>
          <span class="txt">{{ info.registeredCapital }}</span>
        </div>
        <div class="box">
          <span class="name">成立时间</span>
          <span class="txt">{{ info.establishDate }}</span>
        </div>
      </div>
      <div class="address van-ellipsis">
        <!-- <img src="@/assets/images/goods/location.png" class="img" alt=""> -->
        {{ info.provinceName }}{{ info.cityName }}{{ info.districtName }}{{ info.address }}
      </div>
    </div>
</div>
</template>
<script>
import config from "@/http/config";
import TextLogo from '../logo/index.vue'
export default {
  name: "SearchHospital",
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
    index: {
      type: Number,
      default: 0,
    },
    hot: {
      type: Boolean,
      default: true
    }
  },
  components:{
    TextLogo
  },
  data() {
    return {
      IMAGEURL: config.IMAGEURL,
    };
  },
  created() { },
  methods: {
    // 查看医院详情
    lookDetail() {
      let id = this.info.id;
      this.$router.push({
        path: `/inquire/hospital/${id}`,
      });
    },
  },
};
</script>
<style lang="less" scoped>@import "./search_hospital.less";</style>